<template>
	<Lang>
		<router-view></router-view>
		<FormModal ref='formModalRef'/>
		<TableModal ref='tableModalRef'/>
		<ImageModal ref='imageModalRef'/>
	</Lang>
	<teleport to='body'>
		<Toast />
		<Loading />
	</teleport>
</template>

<script setup>
	const Toast 		= $.lazy(()=>import('@tp/toast.vue'))
	const Loading 		= $.lazy(()=>import('@tp/loading.vue'))
	const Lang			= $.lazy(()=>import('@antd/lang.vue'))
	const FormModal 	= $.lazy(()=>import('#cpt/temp/FormModal.vue'))
	const TableModal 	= $.lazy(()=>import('#cpt/temp/TableModal.vue'))
	const ImageModal 	= $.lazy(()=>import('#cpt/temp/ImageModal.vue'))
	
	let formModalRef = $ref()
	let tableModalRef = $ref()
	let imageModalRef = $ref()
	
	window.$formModalRef = () => formModalRef
	window.$tableModalRef = () => tableModalRef
	window.$imageModalRef = () => imageModalRef
</script>
